﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UFIDA.U9.Cust.XH.PlugBE.Model
{
    /// <summary>
    /// 采购订单变更单
    /// </summary>
    public class POModifyModel
    {
        public POModifyModel(UFIDA.U9.PM.POChange.POModify m)
        {
            this.DocType_Name = m.DocumentType?.Name;
            this.DocNo = m.DocNo;
            this.PODocNo = m.PODocNo;
            this.Status = UFIDA.U9.PM.PO.PODOCStatusEnum.EnumRes.GetResource(m.Status.Name);
            this.ModifyReason = UFIDA.U9.PM.POChange.POChangeReasonEnum.EnumRes.GetResource(m.ModifyReason.Name);           
            this.CreatedBy = m.CreatedBy;
            this.CreatedOn = m.CreatedOn;            
            this.Memo = m.Demo;            


        }
        public string DocType_Name { get; set; }
        public string DocNo { get; set; }
        public string PODocNo { get; set; }
        public string Status { get; set; }
        public string ModifyReason { get; set; }        
        public string CreatedBy { get; set; }
        public DateTime CreatedOn { get; set; }       
        public string Memo { get; set; }


    }

    public class POModifyLineModel
    {
        public POModifyLineModel(UFIDA.U9.PM.POChange.POLineModify m)
        {
            this.ItemCode = m.ItemInfo.ItemCode;
            this.ItemName = m.ItemInfo.ItemName;
            this.ItemSPECS = m.ItemInfo.ItemID.SPECS;
            this.ReqQtyTU = m.ReqQtyTU;
            this.PurQtyTU = m.PurQtyTU;
            this.TradeUOM_Name = m.TradeUOM.Name;
            this.Project_Code = m.Project.Code;
            this.Project_Name = m.Project.Name;
            this.TaxRate = m.TaxRate;
            this.TotalTaxAC = m.TotalTaxAC;
            this.TotalMnyAC = m.TotalMnyAC;
            this.FinallyPriceTC = m.FinallyPriceTC;
            this.NetFinallyPriceTC = m.NetFinallyPriceTC;
            
      

        }
        public string ItemCode { get; set; }
        public string ItemName { get; set; }
        public string ItemSPECS { get; set; }

        public decimal ReqQtyTU { get; set; }
        public decimal PurQtyTU { get; set; }
        public string TradeUOM_Name { get; set; }
        public string Project_Code { get; set; }
        public string Project_Name { get; set; }
        public decimal TaxRate { get; set; }
        public decimal TotalTaxAC { get; set; }
        public decimal TotalMnyAC { get; set; }
        public decimal FinallyPriceTC { get; set; }
        public decimal NetFinallyPriceTC { get; set; }
    
    }

}
